import unittest
from api.ihrm_emp_add_delete_update_select import TestIhrmADUS
from common.db_util import DButil
from common.get_header import get_header



class TestIhrmQuery(unittest.TestCase):
    header = None

    @classmethod
    def setUpClass(cls) -> None:
        cls.header = get_header()

    def setUp(self) -> None:
        insert_sql = "insert into bs_user(id, mobile, username) values('1509862426563174400', '13974837801', '随便打打');"
        DButil.uid_db(insert_sql)

    def tearDown(self) -> None:
        delete_sql = "delete from bs_user where id = '1509862426563174400';"
        DButil.uid_db(delete_sql)

    # 测试 查询员工
    def test_query(self):
        res = TestIhrmADUS.select_tmp("1509862426563174400", self.header)
        print("查询结果:",res.json())
